#include "UdpServer.hpp"


// ./udpserver localport
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        std::cerr<<"Usage: "<<argv[0]<<"localport"<<std::endl;
        Die(USAGE_ERR);
    }

    uint16_t port=std::atoi(argv[1]);

    ENABLE_CONSOLE_LOG();

    std::unique_ptr<Udpserver> svr_ptr=std::make_unique<Udpserver>(port);
    svr_ptr->InitServer();//初始化服务器
    svr_ptr->Start();//启动服务器

    return 0;
}